<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>title</title>
</head>

<body>
    <p id="para">单击按钮以更改此段落中的文本:</p>
    <button onclick="myFunc()">点击我</button>
    <script>
        function myFunc() {
            document.getElementById("para").innerHTML = "Hello world";
        }
    </script>
</body>

</html>